package com.company.test.sync;

import sun.misc.Unsafe;

import java.lang.reflect.Field;

/**
 * @author zhangyan
 * @version $ Id: UnsafeDemo.java, v 0.1 2020/9/8 10:40 zhangyan Exp $
 */
public class UnsafeDemo {
    public static void main(String[] args) throws Exception {
        Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
        theUnsafe.setAccessible(true);
        Unsafe o = (Unsafe)theUnsafe.get(null);
        System.out.println(o.addressSize());
    }
}
